//
//  UIViewController+QTAdd.h
//  Pods
//
//  Created by 张俊博 on 16/8/23.
//
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (QTAdd)

/**
 *  返回当前的顶层ViewController
 *
 *  @return ViewController
 */
+ (UIViewController*)currentViewController;

/**
 *  返回当前的导航控制器
 *
 *  @return 控制器
 */
+ (UINavigationController*)currentNavigationViewController;

/**
 *  返回当前的根导航控制器
 *
 *  @return 控制器
 */
+ (nullable UINavigationController *)rootNavigationViewController;


/**
 *  返回当前的根导航控制器的tabController
 *
 *  @return 控制器
 */
+ (nullable UITabBarController *)tabBarController;

/**
 *  返回当前的根导航控制器的tabController当前选中的控制器
 *
 *  @return 控制器
 */
+ (nullable UINavigationController *)tabBarSelectedViewController;

+ (BOOL)isCurrentRssChatVC;
+ (BOOL)isCurrentTeamAssistVC;

+ (void)popTwiceViewControllerAnimated:(BOOL)animated;
+ (void)popViewControllerWithTimes:(NSUInteger)times animated:(BOOL)animated;
+ (void)popToRootViewControllerAnimated:(BOOL)animated;


+ (void)dismissTwiceViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion;
+ (void)dismissViewControllerWithTimes:(NSUInteger)times animated: (BOOL)flag completion: (void (^ __nullable)(void))completion;
+ (void)dismissToRootViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion;

- (void)showTipWithTipText:(NSString *)tips;

+ (void)needShowFPS:(BOOL)needShow;

- (void)setSlidingBackDisable:(BOOL)disable;
- (BOOL)getSlidingBackDisable;

@end

NS_ASSUME_NONNULL_END
